<table class="table table-hover">
    <tr>
        <th>序号</th>
        <th>菜品名称</th>
        <th>单价</th>
        <th>数量</th>
        <th>小计</th>
    </tr>
    {% for detail in detail_list %}
        <tr>
            <td>{{ forloop.counter }}</td>
            <td>{{ detail.product_name }}</td>
            <td>{{ detail.price }}</td>
            <td>{{ detail.quantity }}</td>
            <td>{% widthratio detail.price 1 detail.quantity %}</td>
        </tr>
    {% endfor %}

</table>